package com.shop.common.enums.pink;

import lombok.Getter;

/**
 * 收入类型
 */
@Getter
public enum StorePinkRebateStatusEnum {

    //返佣状态0默认1可以返佣2返佣完成

    DEFAULT(0, ""),
    INIT(1, "可以返佣"),
    FINISH(2, "已完成"),
    ;

    private int key;
    private String name;

    StorePinkRebateStatusEnum(int key, String name) {
        this.key = key;
        this.name = name;
    }

    public static StorePinkRebateStatusEnum val(int key) {
        for (StorePinkRebateStatusEnum enumObj : StorePinkRebateStatusEnum.values()) {
            if(enumObj.key == key) {
                return enumObj;
            }
        }
        return null;
    }
}
